import { Injectable } from "@nestjs/common";
import { InjectRepository } from "@nestjs/typeorm";

import { Repository } from "typeorm";

import { PaymentWeChatMp, PaymentWeChatMpGateway } from "qqlx-core";
import { PaymentWeChatMpSchema } from "qqlx-cdk";

import { PgDao } from "../../lib/dao.pg.id";

@Injectable()
export class PaymentWeChatMpDao extends PgDao<PaymentWeChatMp> {
  constructor(
    @InjectRepository(PaymentWeChatMpSchema)
    readonly repo: Repository<PaymentWeChatMp>,
  ) {
    super({
      repository: repo,
      relations_name: PaymentWeChatMpGateway.relations,
    });
  }
}
